package pages;

import finds.Finder;
import io.appium.java_client.android.AndroidDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * Created by 13714526025 on 2018/9/19.
 * Description：添加设备界面的封装
 */
public class AddDevicePage {
    private AndroidDriver<WebElement> driver;
    private Finder finder;
    public AddDevicePage(Finder finder){
        this.finder=finder;
    }
    //扫码添加
    public void qrAdd(){
        driver.findElement(By.id("com.oppo.ohome:id/card_qr_add")).click();
    }
    //手动添加
    public void handAdd(){
        driver.findElement(By.id("com.oppo.ohome:id/card_hand_add")).click();
    }
    //扫描
    public void scanClick(){
        driver.findElement(By.id("com.oppo.ohome:id/iv_scan")).click();
    }
    //页面返回按钮
    public void backBtn(){
        driver.findElement(By.id("com.oppo.ohome:id/iv_actionbar_back_icon")).click();
    }
}
